import { _decorator, Component, Label, Node } from 'cc';
import { BagItem } from '../goods/goodsInfo';
const { ccclass, property } = _decorator;

@ccclass('SingleGoods')
export class SingleGoods extends Component {
    @property(Node) ndName: Node = null;

    init(item: BagItem) {
        if (this.ndName) {
            this.ndName.getComponent(Label).string = item.name;
        }
    }
}


